package com.example.auv_660.moduleload;

import com.example.auv_660.network.tcp.ModuleReadHandler;
import com.example.auv_660.network.tcp.ModuleWriteHandler;

import java.nio.channels.AsynchronousSocketChannel;

public abstract class ModuleLoad {
    private ModuleLoad nextModuleLoad;

    public void setNextModule(ModuleLoad moduleLoad)
    {
        this.nextModuleLoad = moduleLoad;
    }

    protected ModuleLoad getNextModule()
    {
        return this.nextModuleLoad;
    }

    public abstract void doModuleLoad(String remoteModuleIP, AsynchronousSocketChannel asynchronousSocketChannel);

    public abstract ModuleWriteHandler getWriterHandler();

    public abstract ModuleReadHandler getReadHandler();

    public abstract void releaseModuleResource();
}
